import request from '@/utils/request'

// 获取列表数据
export function queryBomList(data) {
  return request({
    url: '/tEngBom/queryTEngBomList',
    method: 'post',
    data
  })
}
// 获取列表数据(无子物料编码)
export function queryTEngBoms(data) {
  return request({
    url: '/tEngBom/queryTEngBoms',
    method: 'post',
    data
  })
}
// 获取定额因子列表
export function getTEngBomList(data) {
  return request({
    url: '/tEngBom/getTEngBomList',
    method: 'post',
    data
  })
}
// 修改定额因子-人工成本
export function updateBomFlaborcost(data) {
  return request({
    url: '/tEngBom/updateBomFlaborcost',
    method: 'put',
    data
  })
}
// 修改生产工时
export function updateBomPro(data) {
  return request({
    url: '/tEngBom/updateBomPro',
    method: 'put',
    data
  })
}
// 删除BOM
export function deleteBom(data) {
  return request({
    url: '/bomTree/deleteBom',
    method: 'delete',
    data
  })
}
// export excel Bom
export function exportBom(data) {
  return request({
    url: '/tEngBom/exportBom',
    method: 'post',
    data
  })
}
// 批量启用
export function auditBom(data) {
  return request({
    url: '/bomTree/ableBom',
    method: 'post',
    data
  })
}
// 批量禁用
export function unauditBom(data) {
  return request({
    url: '/bomTree/disableBom',
    method: 'post',
    data
  })
}
// 批量审核
export function auditBomList(data) {
  return request({
    url: '/bomTree/auditBomList',
    method: 'post',
    data
  })
}
// 批量反审核
export function unauditBomList(data) {
  return request({
    url: '/bomTree/unauditBomList',
    method: 'post',
    data
  })
}
// 提交
export function submitBomList(data) {
  return request({
    url: '/bomTree/submitBomList',
    method: 'post',
    data
  })
}
// 反提交
export function unsubmitBomList(data) {
  return request({
    url: '/bomTree/unsubmitBomList',
    method: 'post',
    data
  })
}
